Skip to content

feat(cloud): add developer-portal, marketplace-admin, and app-store protocols#631

Merged
hotlong merged 3 commits intomainfrom
copilot/evaluate-plugin-development-process
Feb 12, 2026
Merged

feat(cloud): add developer-portal, marketplace-admin, and app-store protocols#631
hotlong merged 3 commits intomainfrom
copilot/evaluate-plugin-development-process

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 12, 2026

  • Analyze existing protocols (marketplace, kernel, package registry, upgrade, customization)
  • Create cloud/developer-portal.zod.ts — Developer Portal Protocol (PublisherProfile, release channels, listing CRUD, publishing analytics)
  • Create cloud/marketplace-admin.zod.ts — Marketplace Administration Protocol (review workflow, curation, governance, platform analytics)
  • Create cloud/app-store.zod.ts — App Store (Customer) Protocol (reviews/ratings, discovery/recommendations, subscriptions, installed apps)
  • Refactor: Add ApiKeySchema to Identity module following better-auth API key plugin pattern
  • Refactor: Remove duplicate auth/org schemas from developer-portal.zod.ts — use Identity module instead
  • Refactor: Add PublisherProfileSchema linking Identity.Organization to marketplace publisher
  • Update all tests — 5041 tests passing across 190 files
  • Code review — clean
  • Security scan (CodeQL) — no alerts

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstack-play Error Error Feb 12, 2026 3:32am
spec Error Error Feb 12, 2026 3:32am

Request Review

…rotocols

Three new protocol files covering the complete marketplace ecosystem:
- Developer Portal: account management, API keys, release channels, listing CRUD, analytics
- Marketplace Admin: review workflow, curation, governance, platform health metrics
- App Store (Customer): reviews/ratings, discovery/recommendations, subscriptions, installed apps

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Assess plugin development and market management strategies feat(cloud): add developer-portal, marketplace-admin, and app-store protocols Feb 12, 2026
Copilot AI requested a review from hotlong February 12, 2026 02:45
@hotlong
Copy link
Copy Markdown
Contributor

hotlong commented Feb 12, 2026

@copilot cloud 本身也是基于本协议规范开发,认证,组织管理,API-key等尽量使用 better-auth 规范,不要重复造轮子

…auth aligned)

- Remove DeveloperAccountSchema, DeveloperApiKeySchema, ApiKeyScopeSchema,
  DeveloperAccountStatusSchema from developer-portal.zod.ts
- Add ApiKeySchema to Identity module following better-auth's API key plugin
- Add PublisherProfileSchema that links Identity.Organization to marketplace
- Update developer-portal.zod.ts docs to reference Identity namespace

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 12, 2026

@copilot cloud 本身也是基于本协议规范开发,认证,组织管理,API-key等尽量使用 better-auth 规范,不要重复造轮子

Refactored in 0189de6:

  • Removed DeveloperAccountSchema, DeveloperApiKeySchema, ApiKeyScopeSchema, DeveloperAccountStatusSchema from developer-portal.zod.ts
  • Added ApiKeySchema to identity/identity.zod.ts following better-auth's API key plugin pattern (userId, organizationId, permissions, scopes, rate limiting, metadata)
  • Added PublisherProfileSchema as a thin marketplace-specific link from Identity.Organization to publisher identity
  • Developer portal now references the shared Identity module for auth/org/API keys:
    • User & Session → Identity.UserSchema, Identity.SessionSchema
    • Organization & Members → Identity.OrganizationSchema, Identity.MemberSchema
    • API Keys → Identity.ApiKeySchema (with marketplace scopes via scopes field)

@hotlong hotlong marked this pull request as ready for review February 12, 2026 03:46
Copilot AI review requested due to automatic review settings February 12, 2026 03:46
@hotlong hotlong merged commit a15fcba into main Feb 12, 2026
5 of 7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Cloud protocol surface area (Developer Portal, Marketplace Admin, App Store) and extends the Identity module with an API key schema to support cloud marketplace workflows.

Changes:

  • Introduces three new Cloud protocol modules: developer-portal, marketplace-admin, app-store (+ tests).
  • Exports new Cloud modules from packages/spec/src/cloud/index.ts.
  • Adds ApiKeySchema to Identity (+ tests) for better-auth-aligned API key support.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/spec/src/identity/identity.zod.ts Adds ApiKeySchema definition to Identity protocol.
packages/spec/src/identity/identity.test.ts Adds validation/type inference tests for ApiKeySchema.
packages/spec/src/cloud/marketplace-admin.zod.ts Defines marketplace administration/review/curation/governance/analytics schemas.
packages/spec/src/cloud/marketplace-admin.test.ts Adds tests for marketplace-admin schemas.
packages/spec/src/cloud/index.ts Exports newly added cloud protocol modules.
packages/spec/src/cloud/developer-portal.zod.ts Defines developer-portal publisher profile, listing CRUD, release channels, analytics schemas.
packages/spec/src/cloud/developer-portal.test.ts Adds tests for developer-portal schemas.
packages/spec/src/cloud/app-store.zod.ts Defines customer-facing app-store schemas (reviews, discovery, subscriptions, installed apps).
packages/spec/src/cloud/app-store.test.ts Adds tests for app-store schemas.

Comment on lines +191 to +194
description: z.string().optional(),
category: z.string().optional(),
tags: z.array(z.string()).optional(),
iconUrl: z.string().url().optional(),
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

category is currently z.string().optional(), but the shared MarketplaceCategorySchema exists in cloud/marketplace.zod.ts. Consider using it here as well so updates and filtering stay consistent across protocols.

Copilot uses AI. Check for mistakes.
Comment on lines +202 to +205
pricing: z.enum([
'free', 'freemium', 'paid', 'subscription', 'usage-based', 'contact-sales',
]).optional(),
priceInCents: z.number().int().min(0).optional(),
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pricing here redefines the pricing model enum instead of using the shared PricingModelSchema from cloud/marketplace.zod.ts. Reusing the common enum reduces the chance of the update request accepting values the listing/create endpoints don’t.

Copilot uses AI. Check for mistakes.
Comment on lines +356 to +358
/** Sort by */
sortBy: z.enum(['name', 'installed-date', 'updated-date']).default('name'),

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ListInstalledAppsRequestSchema.sortBy allows 'updated-date', but InstalledAppSummarySchema doesn’t expose any updated/last-upgraded timestamp (only installedAt). Either add an updatedAt/upgradedAt field to InstalledAppSummarySchema (kernel has InstalledPackage.updatedAt) or remove 'updated-date' from the sort options so clients can interpret the ordering.

Copilot uses AI. Check for mistakes.
/**
* Key expiration timestamp (null = never expires)
*/
expiresAt: z.string().datetime().optional().describe('Expiration timestamp'),
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field comment says expiresAt can be null to mean “never expires”, but the schema only allows an omitted field (optional) and will reject null. Either update the doc to say the field is omitted when it never expires, or change the schema to accept null explicitly.

Suggested change
expiresAt: z.string().datetime().optional().describe('Expiration timestamp'),
expiresAt: z.string().datetime().nullable().optional().describe('Expiration timestamp'),

Copilot uses AI. Check for mistakes.
Comment on lines +148 to +150
/** Category */
category: z.string().describe('Marketplace category'),

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

category is currently z.string(), but the cloud marketplace protocol already defines MarketplaceCategorySchema. Using the shared enum here keeps validation and allowed values consistent across Marketplace, Developer Portal, and App Store.

Copilot uses AI. Check for mistakes.
Comment on lines +172 to +176
/** Pricing model */
pricing: z.enum([
'free', 'freemium', 'paid', 'subscription', 'usage-based', 'contact-sales',
]).default('free'),

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pricing duplicates the pricing model enum that already exists in cloud/marketplace.zod.ts as PricingModelSchema. Reusing the shared schema avoids divergence (e.g., adding/removing a pricing model in one place).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants